package org.example.dao.dao.market;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.example.dao.dto.market.CommodityDto;
import org.example.dao.entity.market.CCommodity;

import java.util.List;

/**
 * (CCommodity)表数据库访问层
 *
 * @author makejava
 * @since 2023-09-13 08:57:06
 */
@Mapper
public interface CCommodityDao extends BaseMapper<CCommodity> {

    List<Long> getIds(@Param("limit") Long limit, @Param("start") Long start);

    List<CommodityDto> getCommodityDtoByIds(@Param("ids") List ids);

    List<CCommodity> getCommodityByKind(@Param("storeId") Long storeId, @Param("kindId") Long kindId,
                                        @Param("start") Long start, @Param("limit") Long limit);

    Long getCommoditiesNum(@Param("storeId") Long storeId, @Param("kindId") Long kindId);

}

